package com.murong.ai.coder.infrastructure.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class MrDataUtils {

    public static String getCurrentTime(){
        LocalDateTime localNow = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
        return localNow.format(formatter);
    }

    public static String getCurrentMonth(){
        LocalDateTime localNow = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM");
        return localNow.format(formatter);
    }

    public static String getCurrentDay(){
        LocalDateTime localNow = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd");
        return localNow.format(formatter);
    }

    public static String getCurrentDate(){
        LocalDateTime localNow = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
        return localNow.format(formatter);
    }
}
